#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdio.h>
int main()
{
    char a[80];
    scanf("%s", a);
    int count = 0;
    char* s = a;
    while (*s != '\n')
    {
        count++;
        s++;
    }
    gets();
    while (*s != '\n')
    {
        count++;
        s++;
    }
    for (int i = count - 1; i >= 0; i--)
        printf("%c", a[i]);

    return 0;
}
int main1()
{
    int N;
    scanf("%d", &N);
    int arr[10];
    for (int i = 0; i < N; i++)
    {
        scanf("%d", &arr[i]);
    }
    int count, num, max, flag;
    //count = 0;
    for (int i = 0; i < N; i++)
    {
        flag = 0;
        num = 0;
        count = 0;
        //int max = arr[i];
        for (int j = i + 1; j < N; j++)
        {
            if (arr[i] == arr[j])
            {
                count++;
            }
        }
        if (num < count)
        {
            num = count;
            max = arr[i];
        }
    }
    printf("%d %d", max, num);
    return 0;
}